import 'package:flutter/material.dart';

class HomeSearch extends StatefulWidget {
  const HomeSearch({ Key? key }) : super(key: key);

  @override
  HomeSearchState createState() => HomeSearchState();
}

class HomeSearchState extends State<HomeSearch> {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 50,
      color:Color.fromARGB(255, 235, 232, 232),
      padding: EdgeInsets.all(10),
      child: GestureDetector(
        onTap: (){
          Navigator.pushNamed(context, "/detail");
        },
        child: Container(
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(15)
          ),
          padding: EdgeInsets.only(left: 5),
          child: const Row(
            children: [
              Icon(Icons.search, color: Colors.grey,),
              Padding(
                padding: EdgeInsets.only(left: 5), child:  Text(
                  '搜索你要找的商品',
                  style: TextStyle(color: Colors.grey),
                )
              )
            ],
          ),
        ),
      )
    );
  }
}
